﻿Namespace Seguranca.Dominio

    ''' <summary>
    ''' Classe Perfil 
    ''' </summary>
    ''' <remarks></remarks>
    <Serializable()> _
    Public Class Perfil

        Private _id As Nullable(Of Long)

        ''' <summary>
        ''' Identificador da Segurança
        ''' </summary>
        ''' <value>Long</value>
        ''' <returns>Long</returns>
        ''' <remarks></remarks>
        Public Overridable Property Id() As Nullable(Of Long)
            Get
                Return _id
            End Get
            Set(ByVal value As Nullable(Of Long))
                _id = value
            End Set
        End Property

        Private _chave As String

        ''' <summary>
        ''' Chave de Segurança do Perfil
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Chave() As String
            Get
                Return _chave
            End Get
            Set(ByVal value As String)
                _chave = value
            End Set
        End Property

        Private _valor As String

        ''' <summary>
        ''' Valor do Perfil
        ''' </summary>
        ''' <value>String</value>
        ''' <returns>String</returns>
        ''' <remarks></remarks>
        Public Overridable Property Valor() As String
            Get
                Return _valor
            End Get
            Set(ByVal value As String)
                _valor = value
            End Set
        End Property

        Private _papel As Papel

        ''' <summary>
        ''' Propriedade Papel
        ''' </summary>
        ''' <value>Papel(classe Papel)</value>
        ''' <returns>Papel(classe Papel)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Papel() As Papel
            Get
                Return _papel
            End Get
            Set(ByVal value As Papel)
                _papel = value
            End Set
        End Property

        Private _pai As Perfil

        ''' <summary>
        ''' Propriedade Pai
        ''' </summary>
        ''' <value>Perfil(classe Perfil)</value>
        ''' <returns>Perfil(classe Perfil)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Pai() As Perfil
            Get
                Return _pai
            End Get
            Set(ByVal value As Perfil)
                _pai = value
            End Set
        End Property

        Private _permissoes As IList(Of Permissao)

        ''' <summary>
        ''' Permissões do Perfil
        ''' </summary>
        ''' <value>Lista(classe Permissao)</value>
        ''' <returns>Lista(classe Permissao)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Permissoes() As IList(Of Permissao)
            Get
                Return _permissoes
            End Get
            Set(ByVal value As IList(Of Permissao))
                _permissoes = value
            End Set
        End Property

        Private _restricoes As IList(Of Permissao)

        ''' <summary>
        ''' Restrições de Perfil
        ''' </summary>
        ''' <value>Lista(classe Permissao)</value>
        ''' <returns>Lista(classe Permissao)</returns>
        ''' <remarks></remarks>
        Public Overridable Property Restricoes() As IList(Of Permissao)
            Get
                Return _restricoes
            End Get
            Set(ByVal value As IList(Of Permissao))
                _restricoes = value
            End Set
        End Property

        Public Const PerfilChaveConvCd As String = "CONV_CD"
        Public Const PerfilChaveLocalSq As String = "LOCAL_SQ"
        Public Const PerfilChaveUsuarioSistCd As String = "USR_SIST_CD"

    End Class

End Namespace
